﻿using System;
using System.Collections.Generic;
using Monkey.Warrenty.EntityModel;

namespace Monkey.Warrenty.Data.Interfaces
{
    public interface IWarrantyProductDao
    {
        List<WarrantyTicketProductView> GetWarrantyTicketProducts(int statusId, int startIndex, int pageSize, string sorting);
        void UpdateProductStates(List<long> productIds, int statusId);
        void SendToTechnical(List<long> productIds, int employeeId);
        void SendToSupplier(long id, int supplierId, string note, DateTime? sentDate, DateTime? wishDate);
        void SendToSupplier(List<long> ids, int supplierId, string note);
        void SendToWarrantyDep(List<long> ids, int employeeId);

        int GetWarrantyProductsCount(int statusId);
        int GetProcessingWarrantyProductsCount();
        List<WarrantyTicketProductView> GetProcessingWarrantyProducts(int startIndex, int pageSize, string sorting);
        int GetProcessingWarrantyProductsCount(int employeeId);
        List<WarrantyTicketProductView> GetProcessingWarrantyProducts(int employeeId, int startIndex, int pageSize, string sorting);
        WarrantyTicketProductView GetWarrantyTicketProductView(long id);
        
        List<WarrantyTicketProductView> GetReceivedWarrantyProductsByFilter(int startIndex, int pageSize, string sorting, string name, string code, string ticketCode);
        int GetReceivedWarrantyProductsCountByFilter(string name, string code, string ticketCode);
        int GetReceivedWarrantyProductsCount();
        
        int GetLendProductsCount(int statusId);
        List<WarrantyTicketLendProductView> GetLendProducts(int statusId, int startIndex, int pageSize, string sorting);
        void UpdateLendProductStates(List<long> productIds, int statusId);

        int GetWarrantyProductsCountByFilter(int statusId, string name, string code, string ticketCode);
        List<WarrantyTicketProductView> GetWarrantyTicketProductsByFilter(int statusId, int startIndex, int pageSize, string sorting, string name, string code, string ticketCode);

        void UpdateProcessProduct(WarrantyTicketProductView productView);

        void ReceivedCompleted(long id, int supplierId, string note, DateTime? sentDate, DateTime? wishDate, DateTime? receivedDate);
    }
}
